#!/bin/bash
# keep the line which contains - name
sed -n '/- name:/p' $1 > rpmlist1
# delete - name
sed 's/- name://g' rpmlist1 > rpmlist2
# delete blank lines
sed '/^$/d' rpmlist2
# Remove all spaces and tabs in a string
sed 's/[[:space:]]//g' rpmlist2 > rpmlist
rm -rf rpmlist1
rm -rf rpmlist2
